const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports={
    entry:'./app.js',
    mode:'development',
    devServer:{
        static:path.resolve(__dirname,'./dist'),
        compress:false,
        port:3000,
        headers:{
            "X-Access-Token":"123abc"
        },
        // 设置代理，只要访问/api 这个路径，就会指定到这路径下
        proxy:{
            '/api':'http:localhost:9000'
        }
    },
    plugins:[
        new HtmlWebpackPlugin()
    ]

}